#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using UTable.Input;
using UTable.ObjectManager;
using UTable.Objects;
using System.Windows.Media;
using UTable.ObjectManager.Commands;
using UTable.Input.MultiTouch;
using UTable.Input.Text;
using System.Windows.Controls;
using UTable.Objects.Controls;
using System.Security.Policy;
using UTable.Logger;
using UTable.Config;

namespace UTable
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : UApplication
    {
        //protected override IInputProvider GetMultiTouchProvider()
        //{
        //    CompositeProvider provider = new CompositeProvider();
        //    provider.Providers.Add(new TuioProvider());

        //    MultiMouseProvider2 multiMouseProvider = new MultiMouseProvider2();
        //    multiMouseProvider.CurrentWindow = MainWindow;
        //    GetHost().Children.Add(multiMouseProvider);
        //    provider.Providers.Add(multiMouseProvider);

        //    return provider;

        //    // just use Tuio
        //    // return new TuioProvider();

        //    // just use Multiple mouse
        //    // MultiMouseProvider multiMouseProvider = new MultiMouseProvider();
        //    // multiMouseProvider.CurrentWindow = MainWindow;
        //    // GetHost().Children.Add(multiMouseProvider);
        //    // return multiMouseProvider;
        //}

        //protected override Type GetTabletopType()
        //{
        //    return typeof(UMeeting);
        //    // return typeof(UHome);
        //    // return typeof(UDining);
        //}

        protected override UTableConfig GetConfig()
        {
            return ConfigGenerator.GetConfigFromXml("UTable.config");
        }

        protected override void OnTabletopLoaded()
        {
            base.OnTabletopLoaded();
            SLogger.Info("UPlatform started up");
        }

        private void DoTest(Type objectType)
        {
            ObjectCreateParameter param = new ObjectCreateParameter(objectType);
            IObject obj = UTableHelper.CreateObject(param);
            obj.Position = new Point(150, 250);
            obj.Owner = this.Tabletop;
        }
    }
}
